﻿package com.firewolf.adapter.main;

import com.firewolf.adapter.outlet.IThreeElectricOutlet;
import com.firewolf.adapter.outlet.TreeElecricAdapter;
import com.firewolf.adapter.outlet.Tv;
import com.firewolf.adapter.outlet.Wash;

public class Appliction {  
  
    public static void main(String[] args) {  
        IThreeElectricOutlet outlet;  //目标接口三相插座  
        Wash wash=new Wash();  
        outlet=wash;  
        System.out.println("使用洗衣机：使用三相插座接通电流");  
        outlet.connectElectricCurrentByTreeFoot(); 
        
        System.out.println("\n============\n");
        Tv tv=new Tv();  
        TreeElecricAdapter adapter=new TreeElecricAdapter(tv);  
        outlet = adapter;
        System.out.println("播放电视：使用三相插座接通电流");  
        adapter.connectElectricCurrentByTreeFoot();  
    }  
}  